<div class="bg_greenyellow round_10 quarter shadow_in_0">
    <ul class="rightmenu">
        <li><a href='<?php echo $this->url(array('action'=>'current-offers','controller'=>'mymca'),null,true); ?>'>Trwające</a></li>
        <li><a href='<?php echo $this->url(array('action'=>'closed-offers','controller'=>'mymca'),null,true); ?>'>Zamknięte</a></li>
        <li></li>
        <li><a href='<?php echo $this->url(array('action'=>'index','controller'=>'mymca'),null,true); ?>'>Powrót</a></li>

    </ul>      
</div>    

<div class="threequarter vpad_10 last fixed">
    

    <? if(count($this->auctions) > 0){ ?> 
    <h6 class ="round_5 shadow_out_4 bg_mediumblue">Zakończone aukcje</h6>   
    <br />
    <table class="datalist" width="100%">
       <thead>
          <tr>
             <th style="width: 8%">#</th>
             <th style="width: 60%">Nazwa aukcji</th>
             <th style="width: 25%">Zakończona</th>
             <th style="width: 7%">Typ</th>
       </thead>
       <tfoot>
          <tr>
             <th></th>
             <td>&nbsp;</td>
             <td>&nbsp;</td>
             <td>&nbsp;</td>
          </tr>
       </tfoot>
       <tbody>
           <? foreach($this->auctions as $auction){ ?>
          <tr>
             <td><? echo $auction->getAuction_id(); ?></td>
             <td><a href="<?php echo $this->url(array('action'=>'details','controller'=>'auctions','id'=>$auction->getAuction_id()),null,true); ?>"><? echo $auction->getTitle(); ?></a></td>
             <td><? echo $this->dateToString($auction->getEndTime(),true); ?></td>
             <td>
                 <?
                 if($auction->getMarketEntity_id() == $this->user) { ?>
                 <span style="color:green">Aukcja</span>
                 <? } else { ?>
                 <span style="color:blue">Oferty</span>
                 <? } ?>
             </td>
          </tr> 
          <? } ?>
       </tbody>
    </table>
    <br />
    <hr />
        <?php echo $this->paginationControl($this->auctions,
                                    'Sliding',
                                    'utility/my_paginator_helper.phtml'); ?>
    
    <? } else { ?>
    <div class="warning"><p>Nie znaleziono żadnej zakończonej aukcji!</p></div>
    <? } ?>
    <br /><br />

    

</div>